package com.huawei.M01.iterator.M14;

public class Test06 {

    public static void main(String[] args) {
        Thread t = new Thread (){
            @Override
            public void run() {
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    //exception被捕获，但是为输出为false 因为标志位会被清空
                    System.out.println(isInterrupted());
                }
            }
        };
        t.start();
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
        }
        t.interrupt();//置为true

    }
}
